<template>
  <el-config-provider>
    <!-- 三个路由不在layout里面的，其他的路由都在 -->

    <router-view  v-if="$route.path === '/login' || $route.path === '/AddProgram' || $route.path === '/editCarch'" v-slot="{ Component }">
    <template v-if="Component">
          <suspense>
            <component :is="Component"></component>
            <template #fallback>
              <div>
                <!-- 加载中 -->
               加载中
              </div>
            </template>
          </suspense>
    </template>
  </router-view>
  <layout v-else></layout>
  </el-config-provider>
</template>

<script setup lang="ts">
import layout from '@/layout/index.vue'
import { useSysStore } from '@/store/sys'

const sysStore = useSysStore()
// const locale = computed(() => (sysStore.language === 'zh-CN' ? zhCn : en))
</script>

<style lang="scss">
@import "@/assets/iconfont/iconfont.css";
@import "@/assets/public.css";
// 输入框里有文字我们用鼠标选中时候的颜色
::v-deep .el-input input::selection {
  background-color: #79bbff;
}
::selection {
  background-color: #79bbff;  /* 设置你想要的背景色 */
}
html.dark {
  body {
    background: #000;
  }
}
</style>
